package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelDistanceComparatorDescending implements Comparator<Hotel>{

	private static HotelDistanceComparatorDescending hotelDistanceComparatorDescending = new HotelDistanceComparatorDescending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel2.getStarValue().getDistance()-hotel1.getStarValue().getDistance();
	}
	
	private HotelDistanceComparatorDescending(){
		
	}
	
	public static HotelDistanceComparatorDescending getInstance(){
		return hotelDistanceComparatorDescending;
	}		
	
	
}
